


















<?php 
				
				$arcModel = new \Common\Model\Arc;
				$data = $arcModel
//				关联文章表于分类表并获取'aid,title,author,sendtime,cname,cid,thumb,digest'
				->field('aid,title,author,sendtime,cname,cid,thumb,digest')
				->join('category','category_cid','=','cid')
//				降序排列
				->orderBy('sendtime','DESC')
//				只显示2个
				->limit(5)
//				获取
				->get();

				$tagModel = new \Common\Model\Tag;
				$arcTagModel = new \Common\Model\ArcTag;
				
//				友情链接模板
				$linkModel = new \Common\Model\Link;
				$linkData = $linkModel->get();
				
//				标签表
				$tagData = $tagModel->get();
				foreach ($tagData as $k => $v) {
					//article_tag中间表和tag表关联
					$tagData[$k]['tagq'] = $arcTagModel->where("tag_tid={$v['tid']}")->join('article','article_aid','=','aid')->count();
				}
				
				 ?>
<footer>
  <div class="footer-mid">
    <div class="links">
      <h2>友情链接</h2>
      <ul>
      	{{foreach from="$linkData" value="$v"}}
        <li>
			<a href="{{$v['url']}}">{{$v['lname']}}</a>		
        </li>
        {{endforeach}}
      </ul>
    </div>
    <div class="visitors" style="margin-left: 130px;">
      <h2>最新文章</h2>
      {{foreach from="$data" value="$v"}}
						<div id="" class="_single">
							<p><a href="{{U('Arc/index',array('aid'=>$v['aid']))}}">{{$v['title']}}</a></p>
							<time datetime="{{$v['sendtime']}}">{{date('Y-m-d',$v['sendtime'])}}</time>
						</div>
						{{endforeach}}
   
    </div>
    <section class="flickr">
      <h2>摄影作品</h2>
      <ul>
        <li><a href="/"><img src="Public/Home/images/01.jpg"></a></li>
        <li><a href="/"><img src="Public/Home/images/02.jpg"></a></li>
        <li><a href="/"><img src="Public/Home/images/03.jpg"></a></li>
        <li><a href="/"><img src="Public/Home/images/04.jpg"></a></li>
        <li><a href="/"><img src="Public/Home/images/05.jpg"></a></li>
        <li><a href="/"><img src="Public/Home/images/06.jpg"></a></li>
        <li><a href="/"><img src="Public/Home/images/07.jpg"></a></li>
        <li><a href="/"><img src="Public/Home/images/08.jpg"></a></li>
        <li><a href="/"><img src="Public/Home/images/09.jpg"></a></li>
      </ul>
    </section>
  </div>
  <div class="footer-bottom" style="text-align: center;">
    <p>
    	<a href="">{{C('webset.WEB_NAME')}}</a>
		 | 
		<a href="">{{C('webset.COPY_RIGHT')}}</a>
		 |
		<a href="">{{C('webset.ADMIN_EMAIL')}}</a>
    </p>
  </div>
</footer>
<!-- jQuery仿腾讯回顶部和建议 代码开始 -->
<div id="tbox"> <a id="togbook" href="/e/tool/gbook/?bid=1"></a> <a id="gotop" href="javascript:void(0)"></a> </div>
<!-- 代码结束 -->